STEP 11: If random_choice is 1, the computer picks "rock". Let's store that data in a new variable to use later to calculate who won the game.

  • In LOGIC, click . Drop String Variable inside the last if-statement, below .Sprite().
  • Change the name of the new variable from my_var to computer_choice.
  • Change the value of the new variable to "rock".

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)